{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import tushare as ts\n",
    "import numpy as np\n",
    "import pandas as pd\n",
    "import matplotlib.pyplot as plt"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 使用tushare包获取某股票的历史行情数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {},
   "outputs": [],
   "source": [
    "df = ts.get_k_data(\"600519\",start=\"2016-01-01\")\n",
    "df.to_csv(\"601318.csv\")  # 中国平安"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>open</th>\n",
       "      <th>close</th>\n",
       "      <th>high</th>\n",
       "      <th>low</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>date</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2016-01-04</th>\n",
       "      <td>207.277</td>\n",
       "      <td>199.671</td>\n",
       "      <td>207.277</td>\n",
       "      <td>199.661</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-01-05</th>\n",
       "      <td>199.671</td>\n",
       "      <td>202.352</td>\n",
       "      <td>203.446</td>\n",
       "      <td>197.303</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-01-06</th>\n",
       "      <td>202.314</td>\n",
       "      <td>201.744</td>\n",
       "      <td>203.151</td>\n",
       "      <td>199.005</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-01-07</th>\n",
       "      <td>198.711</td>\n",
       "      <td>192.283</td>\n",
       "      <td>198.711</td>\n",
       "      <td>190.191</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-01-08</th>\n",
       "      <td>194.128</td>\n",
       "      <td>194.565</td>\n",
       "      <td>197.769</td>\n",
       "      <td>190.163</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-01-11</th>\n",
       "      <td>193.167</td>\n",
       "      <td>190.030</td>\n",
       "      <td>193.766</td>\n",
       "      <td>189.592</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-01-12</th>\n",
       "      <td>191.209</td>\n",
       "      <td>187.111</td>\n",
       "      <td>192.160</td>\n",
       "      <td>186.360</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-01-13</th>\n",
       "      <td>189.307</td>\n",
       "      <td>189.954</td>\n",
       "      <td>195.868</td>\n",
       "      <td>188.832</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-01-14</th>\n",
       "      <td>187.415</td>\n",
       "      <td>194.746</td>\n",
       "      <td>195.849</td>\n",
       "      <td>185.894</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-01-15</th>\n",
       "      <td>194.679</td>\n",
       "      <td>189.212</td>\n",
       "      <td>196.039</td>\n",
       "      <td>188.261</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-01-18</th>\n",
       "      <td>188.261</td>\n",
       "      <td>189.621</td>\n",
       "      <td>192.445</td>\n",
       "      <td>187.501</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-01-19</th>\n",
       "      <td>191.114</td>\n",
       "      <td>199.899</td>\n",
       "      <td>199.985</td>\n",
       "      <td>190.172</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-01-20</th>\n",
       "      <td>196.819</td>\n",
       "      <td>192.369</td>\n",
       "      <td>199.823</td>\n",
       "      <td>191.123</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-01-21</th>\n",
       "      <td>191.361</td>\n",
       "      <td>190.410</td>\n",
       "      <td>194.527</td>\n",
       "      <td>190.068</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-01-22</th>\n",
       "      <td>193.120</td>\n",
       "      <td>192.768</td>\n",
       "      <td>193.396</td>\n",
       "      <td>189.031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-01-25</th>\n",
       "      <td>193.015</td>\n",
       "      <td>192.797</td>\n",
       "      <td>193.481</td>\n",
       "      <td>191.589</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-01-26</th>\n",
       "      <td>191.104</td>\n",
       "      <td>189.222</td>\n",
       "      <td>194.413</td>\n",
       "      <td>188.737</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-01-27</th>\n",
       "      <td>190.144</td>\n",
       "      <td>190.096</td>\n",
       "      <td>191.009</td>\n",
       "      <td>186.074</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-01-28</th>\n",
       "      <td>189.925</td>\n",
       "      <td>186.968</td>\n",
       "      <td>189.925</td>\n",
       "      <td>185.998</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-01-29</th>\n",
       "      <td>187.767</td>\n",
       "      <td>190.781</td>\n",
       "      <td>192.540</td>\n",
       "      <td>187.310</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-02-01</th>\n",
       "      <td>192.160</td>\n",
       "      <td>191.389</td>\n",
       "      <td>192.825</td>\n",
       "      <td>190.058</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-02-02</th>\n",
       "      <td>192.064</td>\n",
       "      <td>194.489</td>\n",
       "      <td>194.727</td>\n",
       "      <td>190.771</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-02-03</th>\n",
       "      <td>192.616</td>\n",
       "      <td>193.643</td>\n",
       "      <td>194.499</td>\n",
       "      <td>191.589</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-02-04</th>\n",
       "      <td>194.727</td>\n",
       "      <td>194.907</td>\n",
       "      <td>195.754</td>\n",
       "      <td>193.529</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-02-05</th>\n",
       "      <td>194.907</td>\n",
       "      <td>193.842</td>\n",
       "      <td>195.088</td>\n",
       "      <td>192.568</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-02-15</th>\n",
       "      <td>190.163</td>\n",
       "      <td>190.553</td>\n",
       "      <td>193.015</td>\n",
       "      <td>189.783</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-02-16</th>\n",
       "      <td>190.695</td>\n",
       "      <td>193.890</td>\n",
       "      <td>197.769</td>\n",
       "      <td>190.695</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-02-17</th>\n",
       "      <td>193.719</td>\n",
       "      <td>192.350</td>\n",
       "      <td>194.841</td>\n",
       "      <td>190.648</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-02-18</th>\n",
       "      <td>193.205</td>\n",
       "      <td>191.789</td>\n",
       "      <td>193.586</td>\n",
       "      <td>191.209</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-02-19</th>\n",
       "      <td>191.703</td>\n",
       "      <td>193.120</td>\n",
       "      <td>193.186</td>\n",
       "      <td>191.237</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-08</th>\n",
       "      <td>1152.000</td>\n",
       "      <td>1159.760</td>\n",
       "      <td>1166.310</td>\n",
       "      <td>1152.000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-09</th>\n",
       "      <td>1166.000</td>\n",
       "      <td>1158.500</td>\n",
       "      <td>1169.000</td>\n",
       "      <td>1147.960</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-10</th>\n",
       "      <td>1157.880</td>\n",
       "      <td>1165.000</td>\n",
       "      <td>1181.500</td>\n",
       "      <td>1153.500</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-13</th>\n",
       "      <td>1165.000</td>\n",
       "      <td>1162.300</td>\n",
       "      <td>1169.980</td>\n",
       "      <td>1148.500</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-14</th>\n",
       "      <td>1176.000</td>\n",
       "      <td>1185.100</td>\n",
       "      <td>1191.550</td>\n",
       "      <td>1166.000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-15</th>\n",
       "      <td>1192.000</td>\n",
       "      <td>1189.600</td>\n",
       "      <td>1203.990</td>\n",
       "      <td>1187.100</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-16</th>\n",
       "      <td>1192.970</td>\n",
       "      <td>1197.100</td>\n",
       "      <td>1197.100</td>\n",
       "      <td>1184.100</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-17</th>\n",
       "      <td>1210.000</td>\n",
       "      <td>1226.000</td>\n",
       "      <td>1234.560</td>\n",
       "      <td>1205.010</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-20</th>\n",
       "      <td>1221.000</td>\n",
       "      <td>1227.300</td>\n",
       "      <td>1231.500</td>\n",
       "      <td>1216.800</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-21</th>\n",
       "      <td>1221.020</td>\n",
       "      <td>1200.000</td>\n",
       "      <td>1223.990</td>\n",
       "      <td>1193.000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-22</th>\n",
       "      <td>1206.000</td>\n",
       "      <td>1244.500</td>\n",
       "      <td>1249.500</td>\n",
       "      <td>1202.220</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-23</th>\n",
       "      <td>1250.000</td>\n",
       "      <td>1252.260</td>\n",
       "      <td>1265.680</td>\n",
       "      <td>1247.770</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-24</th>\n",
       "      <td>1248.000</td>\n",
       "      <td>1250.560</td>\n",
       "      <td>1259.890</td>\n",
       "      <td>1235.180</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-27</th>\n",
       "      <td>1257.000</td>\n",
       "      <td>1276.000</td>\n",
       "      <td>1278.170</td>\n",
       "      <td>1250.960</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-28</th>\n",
       "      <td>1285.310</td>\n",
       "      <td>1279.130</td>\n",
       "      <td>1299.940</td>\n",
       "      <td>1271.880</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-29</th>\n",
       "      <td>1277.800</td>\n",
       "      <td>1274.900</td>\n",
       "      <td>1288.100</td>\n",
       "      <td>1258.000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-30</th>\n",
       "      <td>1271.000</td>\n",
       "      <td>1265.700</td>\n",
       "      <td>1285.010</td>\n",
       "      <td>1258.880</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-05-06</th>\n",
       "      <td>1251.000</td>\n",
       "      <td>1300.000</td>\n",
       "      <td>1300.000</td>\n",
       "      <td>1250.000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-05-07</th>\n",
       "      <td>1299.400</td>\n",
       "      <td>1312.000</td>\n",
       "      <td>1314.990</td>\n",
       "      <td>1293.000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-05-08</th>\n",
       "      <td>1317.000</td>\n",
       "      <td>1314.610</td>\n",
       "      <td>1338.000</td>\n",
       "      <td>1308.510</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-05-11</th>\n",
       "      <td>1320.000</td>\n",
       "      <td>1323.010</td>\n",
       "      <td>1335.000</td>\n",
       "      <td>1313.670</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-05-12</th>\n",
       "      <td>1318.000</td>\n",
       "      <td>1333.000</td>\n",
       "      <td>1334.990</td>\n",
       "      <td>1316.000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-05-13</th>\n",
       "      <td>1333.000</td>\n",
       "      <td>1335.950</td>\n",
       "      <td>1337.990</td>\n",
       "      <td>1322.880</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-05-14</th>\n",
       "      <td>1330.000</td>\n",
       "      <td>1326.590</td>\n",
       "      <td>1334.880</td>\n",
       "      <td>1325.110</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-05-15</th>\n",
       "      <td>1329.000</td>\n",
       "      <td>1313.000</td>\n",
       "      <td>1333.500</td>\n",
       "      <td>1301.880</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-05-18</th>\n",
       "      <td>1306.000</td>\n",
       "      <td>1346.210</td>\n",
       "      <td>1351.500</td>\n",
       "      <td>1305.130</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-05-19</th>\n",
       "      <td>1364.000</td>\n",
       "      <td>1346.110</td>\n",
       "      <td>1364.000</td>\n",
       "      <td>1338.000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-05-20</th>\n",
       "      <td>1346.110</td>\n",
       "      <td>1351.000</td>\n",
       "      <td>1359.180</td>\n",
       "      <td>1336.810</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-05-21</th>\n",
       "      <td>1355.000</td>\n",
       "      <td>1366.100</td>\n",
       "      <td>1371.960</td>\n",
       "      <td>1352.860</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-05-22</th>\n",
       "      <td>1366.000</td>\n",
       "      <td>1328.200</td>\n",
       "      <td>1366.100</td>\n",
       "      <td>1322.880</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>1067 rows × 4 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                open     close      high       low\n",
       "date                                              \n",
       "2016-01-04   207.277   199.671   207.277   199.661\n",
       "2016-01-05   199.671   202.352   203.446   197.303\n",
       "2016-01-06   202.314   201.744   203.151   199.005\n",
       "2016-01-07   198.711   192.283   198.711   190.191\n",
       "2016-01-08   194.128   194.565   197.769   190.163\n",
       "2016-01-11   193.167   190.030   193.766   189.592\n",
       "2016-01-12   191.209   187.111   192.160   186.360\n",
       "2016-01-13   189.307   189.954   195.868   188.832\n",
       "2016-01-14   187.415   194.746   195.849   185.894\n",
       "2016-01-15   194.679   189.212   196.039   188.261\n",
       "2016-01-18   188.261   189.621   192.445   187.501\n",
       "2016-01-19   191.114   199.899   199.985   190.172\n",
       "2016-01-20   196.819   192.369   199.823   191.123\n",
       "2016-01-21   191.361   190.410   194.527   190.068\n",
       "2016-01-22   193.120   192.768   193.396   189.031\n",
       "2016-01-25   193.015   192.797   193.481   191.589\n",
       "2016-01-26   191.104   189.222   194.413   188.737\n",
       "2016-01-27   190.144   190.096   191.009   186.074\n",
       "2016-01-28   189.925   186.968   189.925   185.998\n",
       "2016-01-29   187.767   190.781   192.540   187.310\n",
       "2016-02-01   192.160   191.389   192.825   190.058\n",
       "2016-02-02   192.064   194.489   194.727   190.771\n",
       "2016-02-03   192.616   193.643   194.499   191.589\n",
       "2016-02-04   194.727   194.907   195.754   193.529\n",
       "2016-02-05   194.907   193.842   195.088   192.568\n",
       "2016-02-15   190.163   190.553   193.015   189.783\n",
       "2016-02-16   190.695   193.890   197.769   190.695\n",
       "2016-02-17   193.719   192.350   194.841   190.648\n",
       "2016-02-18   193.205   191.789   193.586   191.209\n",
       "2016-02-19   191.703   193.120   193.186   191.237\n",
       "...              ...       ...       ...       ...\n",
       "2020-04-08  1152.000  1159.760  1166.310  1152.000\n",
       "2020-04-09  1166.000  1158.500  1169.000  1147.960\n",
       "2020-04-10  1157.880  1165.000  1181.500  1153.500\n",
       "2020-04-13  1165.000  1162.300  1169.980  1148.500\n",
       "2020-04-14  1176.000  1185.100  1191.550  1166.000\n",
       "2020-04-15  1192.000  1189.600  1203.990  1187.100\n",
       "2020-04-16  1192.970  1197.100  1197.100  1184.100\n",
       "2020-04-17  1210.000  1226.000  1234.560  1205.010\n",
       "2020-04-20  1221.000  1227.300  1231.500  1216.800\n",
       "2020-04-21  1221.020  1200.000  1223.990  1193.000\n",
       "2020-04-22  1206.000  1244.500  1249.500  1202.220\n",
       "2020-04-23  1250.000  1252.260  1265.680  1247.770\n",
       "2020-04-24  1248.000  1250.560  1259.890  1235.180\n",
       "2020-04-27  1257.000  1276.000  1278.170  1250.960\n",
       "2020-04-28  1285.310  1279.130  1299.940  1271.880\n",
       "2020-04-29  1277.800  1274.900  1288.100  1258.000\n",
       "2020-04-30  1271.000  1265.700  1285.010  1258.880\n",
       "2020-05-06  1251.000  1300.000  1300.000  1250.000\n",
       "2020-05-07  1299.400  1312.000  1314.990  1293.000\n",
       "2020-05-08  1317.000  1314.610  1338.000  1308.510\n",
       "2020-05-11  1320.000  1323.010  1335.000  1313.670\n",
       "2020-05-12  1318.000  1333.000  1334.990  1316.000\n",
       "2020-05-13  1333.000  1335.950  1337.990  1322.880\n",
       "2020-05-14  1330.000  1326.590  1334.880  1325.110\n",
       "2020-05-15  1329.000  1313.000  1333.500  1301.880\n",
       "2020-05-18  1306.000  1346.210  1351.500  1305.130\n",
       "2020-05-19  1364.000  1346.110  1364.000  1338.000\n",
       "2020-05-20  1346.110  1351.000  1359.180  1336.810\n",
       "2020-05-21  1355.000  1366.100  1371.960  1352.860\n",
       "2020-05-22  1366.000  1328.200  1366.100  1322.880\n",
       "\n",
       "[1067 rows x 4 columns]"
      ]
     },
     "execution_count": 37,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 用date作为索引，只要需要的open（开盘价）、close（收盘价）、high（最高价）、low（最低价）\n",
    "df = pd.read_csv(\"601318.csv\", index_col=\"date\",parse_dates=['date'])[['open','close','high','low']]\n",
    "df"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 使用pandas包计算改股票历史数据的5日均线和30日均线"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>open</th>\n",
       "      <th>close</th>\n",
       "      <th>high</th>\n",
       "      <th>low</th>\n",
       "      <th>ma5</th>\n",
       "      <th>ma30</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>date</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2016-01-04</th>\n",
       "      <td>207.277</td>\n",
       "      <td>199.671</td>\n",
       "      <td>207.277</td>\n",
       "      <td>199.661</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-01-05</th>\n",
       "      <td>199.671</td>\n",
       "      <td>202.352</td>\n",
       "      <td>203.446</td>\n",
       "      <td>197.303</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-01-06</th>\n",
       "      <td>202.314</td>\n",
       "      <td>201.744</td>\n",
       "      <td>203.151</td>\n",
       "      <td>199.005</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-01-07</th>\n",
       "      <td>198.711</td>\n",
       "      <td>192.283</td>\n",
       "      <td>198.711</td>\n",
       "      <td>190.191</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-01-08</th>\n",
       "      <td>194.128</td>\n",
       "      <td>194.565</td>\n",
       "      <td>197.769</td>\n",
       "      <td>190.163</td>\n",
       "      <td>198.1230</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-01-11</th>\n",
       "      <td>193.167</td>\n",
       "      <td>190.030</td>\n",
       "      <td>193.766</td>\n",
       "      <td>189.592</td>\n",
       "      <td>196.1948</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-01-12</th>\n",
       "      <td>191.209</td>\n",
       "      <td>187.111</td>\n",
       "      <td>192.160</td>\n",
       "      <td>186.360</td>\n",
       "      <td>193.1466</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-01-13</th>\n",
       "      <td>189.307</td>\n",
       "      <td>189.954</td>\n",
       "      <td>195.868</td>\n",
       "      <td>188.832</td>\n",
       "      <td>190.7886</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-01-14</th>\n",
       "      <td>187.415</td>\n",
       "      <td>194.746</td>\n",
       "      <td>195.849</td>\n",
       "      <td>185.894</td>\n",
       "      <td>191.2812</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-01-15</th>\n",
       "      <td>194.679</td>\n",
       "      <td>189.212</td>\n",
       "      <td>196.039</td>\n",
       "      <td>188.261</td>\n",
       "      <td>190.2106</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-01-18</th>\n",
       "      <td>188.261</td>\n",
       "      <td>189.621</td>\n",
       "      <td>192.445</td>\n",
       "      <td>187.501</td>\n",
       "      <td>190.1288</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-01-19</th>\n",
       "      <td>191.114</td>\n",
       "      <td>199.899</td>\n",
       "      <td>199.985</td>\n",
       "      <td>190.172</td>\n",
       "      <td>192.6864</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-01-20</th>\n",
       "      <td>196.819</td>\n",
       "      <td>192.369</td>\n",
       "      <td>199.823</td>\n",
       "      <td>191.123</td>\n",
       "      <td>193.1694</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-01-21</th>\n",
       "      <td>191.361</td>\n",
       "      <td>190.410</td>\n",
       "      <td>194.527</td>\n",
       "      <td>190.068</td>\n",
       "      <td>192.3022</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-01-22</th>\n",
       "      <td>193.120</td>\n",
       "      <td>192.768</td>\n",
       "      <td>193.396</td>\n",
       "      <td>189.031</td>\n",
       "      <td>193.0134</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-01-25</th>\n",
       "      <td>193.015</td>\n",
       "      <td>192.797</td>\n",
       "      <td>193.481</td>\n",
       "      <td>191.589</td>\n",
       "      <td>193.6486</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-01-26</th>\n",
       "      <td>191.104</td>\n",
       "      <td>189.222</td>\n",
       "      <td>194.413</td>\n",
       "      <td>188.737</td>\n",
       "      <td>191.5132</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-01-27</th>\n",
       "      <td>190.144</td>\n",
       "      <td>190.096</td>\n",
       "      <td>191.009</td>\n",
       "      <td>186.074</td>\n",
       "      <td>191.0586</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-01-28</th>\n",
       "      <td>189.925</td>\n",
       "      <td>186.968</td>\n",
       "      <td>189.925</td>\n",
       "      <td>185.998</td>\n",
       "      <td>190.3702</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-01-29</th>\n",
       "      <td>187.767</td>\n",
       "      <td>190.781</td>\n",
       "      <td>192.540</td>\n",
       "      <td>187.310</td>\n",
       "      <td>189.9728</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-02-01</th>\n",
       "      <td>192.160</td>\n",
       "      <td>191.389</td>\n",
       "      <td>192.825</td>\n",
       "      <td>190.058</td>\n",
       "      <td>189.6912</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-02-02</th>\n",
       "      <td>192.064</td>\n",
       "      <td>194.489</td>\n",
       "      <td>194.727</td>\n",
       "      <td>190.771</td>\n",
       "      <td>190.7446</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-02-03</th>\n",
       "      <td>192.616</td>\n",
       "      <td>193.643</td>\n",
       "      <td>194.499</td>\n",
       "      <td>191.589</td>\n",
       "      <td>191.4540</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-02-04</th>\n",
       "      <td>194.727</td>\n",
       "      <td>194.907</td>\n",
       "      <td>195.754</td>\n",
       "      <td>193.529</td>\n",
       "      <td>193.0418</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-02-05</th>\n",
       "      <td>194.907</td>\n",
       "      <td>193.842</td>\n",
       "      <td>195.088</td>\n",
       "      <td>192.568</td>\n",
       "      <td>193.6540</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-02-15</th>\n",
       "      <td>190.163</td>\n",
       "      <td>190.553</td>\n",
       "      <td>193.015</td>\n",
       "      <td>189.783</td>\n",
       "      <td>193.4868</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-02-16</th>\n",
       "      <td>190.695</td>\n",
       "      <td>193.890</td>\n",
       "      <td>197.769</td>\n",
       "      <td>190.695</td>\n",
       "      <td>193.3670</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-02-17</th>\n",
       "      <td>193.719</td>\n",
       "      <td>192.350</td>\n",
       "      <td>194.841</td>\n",
       "      <td>190.648</td>\n",
       "      <td>193.1084</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-02-18</th>\n",
       "      <td>193.205</td>\n",
       "      <td>191.789</td>\n",
       "      <td>193.586</td>\n",
       "      <td>191.209</td>\n",
       "      <td>192.4848</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-02-19</th>\n",
       "      <td>191.703</td>\n",
       "      <td>193.120</td>\n",
       "      <td>193.186</td>\n",
       "      <td>191.237</td>\n",
       "      <td>192.3404</td>\n",
       "      <td>192.885700</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-08</th>\n",
       "      <td>1152.000</td>\n",
       "      <td>1159.760</td>\n",
       "      <td>1166.310</td>\n",
       "      <td>1152.000</td>\n",
       "      <td>1141.5000</td>\n",
       "      <td>1096.299000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-09</th>\n",
       "      <td>1166.000</td>\n",
       "      <td>1158.500</td>\n",
       "      <td>1169.000</td>\n",
       "      <td>1147.960</td>\n",
       "      <td>1152.6000</td>\n",
       "      <td>1099.125667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-10</th>\n",
       "      <td>1157.880</td>\n",
       "      <td>1165.000</td>\n",
       "      <td>1181.500</td>\n",
       "      <td>1153.500</td>\n",
       "      <td>1156.6000</td>\n",
       "      <td>1101.712667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-13</th>\n",
       "      <td>1165.000</td>\n",
       "      <td>1162.300</td>\n",
       "      <td>1169.980</td>\n",
       "      <td>1148.500</td>\n",
       "      <td>1161.1020</td>\n",
       "      <td>1105.222667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-14</th>\n",
       "      <td>1176.000</td>\n",
       "      <td>1185.100</td>\n",
       "      <td>1191.550</td>\n",
       "      <td>1166.000</td>\n",
       "      <td>1166.1320</td>\n",
       "      <td>1108.525667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-15</th>\n",
       "      <td>1192.000</td>\n",
       "      <td>1189.600</td>\n",
       "      <td>1203.990</td>\n",
       "      <td>1187.100</td>\n",
       "      <td>1172.1000</td>\n",
       "      <td>1111.079000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-16</th>\n",
       "      <td>1192.970</td>\n",
       "      <td>1197.100</td>\n",
       "      <td>1197.100</td>\n",
       "      <td>1184.100</td>\n",
       "      <td>1179.8200</td>\n",
       "      <td>1113.351667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-17</th>\n",
       "      <td>1210.000</td>\n",
       "      <td>1226.000</td>\n",
       "      <td>1234.560</td>\n",
       "      <td>1205.010</td>\n",
       "      <td>1192.0200</td>\n",
       "      <td>1115.185000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-20</th>\n",
       "      <td>1221.000</td>\n",
       "      <td>1227.300</td>\n",
       "      <td>1231.500</td>\n",
       "      <td>1216.800</td>\n",
       "      <td>1205.0200</td>\n",
       "      <td>1117.578333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-21</th>\n",
       "      <td>1221.020</td>\n",
       "      <td>1200.000</td>\n",
       "      <td>1223.990</td>\n",
       "      <td>1193.000</td>\n",
       "      <td>1208.0000</td>\n",
       "      <td>1120.444667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-22</th>\n",
       "      <td>1206.000</td>\n",
       "      <td>1244.500</td>\n",
       "      <td>1249.500</td>\n",
       "      <td>1202.220</td>\n",
       "      <td>1218.9800</td>\n",
       "      <td>1123.394667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-23</th>\n",
       "      <td>1250.000</td>\n",
       "      <td>1252.260</td>\n",
       "      <td>1265.680</td>\n",
       "      <td>1247.770</td>\n",
       "      <td>1230.0120</td>\n",
       "      <td>1126.519333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-24</th>\n",
       "      <td>1248.000</td>\n",
       "      <td>1250.560</td>\n",
       "      <td>1259.890</td>\n",
       "      <td>1235.180</td>\n",
       "      <td>1234.9240</td>\n",
       "      <td>1130.254667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-27</th>\n",
       "      <td>1257.000</td>\n",
       "      <td>1276.000</td>\n",
       "      <td>1278.170</td>\n",
       "      <td>1250.960</td>\n",
       "      <td>1244.6640</td>\n",
       "      <td>1135.720333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-28</th>\n",
       "      <td>1285.310</td>\n",
       "      <td>1279.130</td>\n",
       "      <td>1299.940</td>\n",
       "      <td>1271.880</td>\n",
       "      <td>1260.4900</td>\n",
       "      <td>1142.791333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-29</th>\n",
       "      <td>1277.800</td>\n",
       "      <td>1274.900</td>\n",
       "      <td>1288.100</td>\n",
       "      <td>1258.000</td>\n",
       "      <td>1266.5700</td>\n",
       "      <td>1150.451333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-30</th>\n",
       "      <td>1271.000</td>\n",
       "      <td>1265.700</td>\n",
       "      <td>1285.010</td>\n",
       "      <td>1258.880</td>\n",
       "      <td>1269.2580</td>\n",
       "      <td>1159.041667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-05-06</th>\n",
       "      <td>1251.000</td>\n",
       "      <td>1300.000</td>\n",
       "      <td>1300.000</td>\n",
       "      <td>1250.000</td>\n",
       "      <td>1279.1460</td>\n",
       "      <td>1169.175000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-05-07</th>\n",
       "      <td>1299.400</td>\n",
       "      <td>1312.000</td>\n",
       "      <td>1314.990</td>\n",
       "      <td>1293.000</td>\n",
       "      <td>1286.3460</td>\n",
       "      <td>1178.399000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-05-08</th>\n",
       "      <td>1317.000</td>\n",
       "      <td>1314.610</td>\n",
       "      <td>1338.000</td>\n",
       "      <td>1308.510</td>\n",
       "      <td>1293.4420</td>\n",
       "      <td>1188.252667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-05-11</th>\n",
       "      <td>1320.000</td>\n",
       "      <td>1323.010</td>\n",
       "      <td>1335.000</td>\n",
       "      <td>1313.670</td>\n",
       "      <td>1303.0640</td>\n",
       "      <td>1197.153000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-05-12</th>\n",
       "      <td>1318.000</td>\n",
       "      <td>1333.000</td>\n",
       "      <td>1334.990</td>\n",
       "      <td>1316.000</td>\n",
       "      <td>1316.5240</td>\n",
       "      <td>1205.583000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-05-13</th>\n",
       "      <td>1333.000</td>\n",
       "      <td>1335.950</td>\n",
       "      <td>1337.990</td>\n",
       "      <td>1322.880</td>\n",
       "      <td>1323.7140</td>\n",
       "      <td>1214.617333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-05-14</th>\n",
       "      <td>1330.000</td>\n",
       "      <td>1326.590</td>\n",
       "      <td>1334.880</td>\n",
       "      <td>1325.110</td>\n",
       "      <td>1326.6320</td>\n",
       "      <td>1222.987000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-05-15</th>\n",
       "      <td>1329.000</td>\n",
       "      <td>1313.000</td>\n",
       "      <td>1333.500</td>\n",
       "      <td>1301.880</td>\n",
       "      <td>1326.3100</td>\n",
       "      <td>1231.020333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-05-18</th>\n",
       "      <td>1306.000</td>\n",
       "      <td>1346.210</td>\n",
       "      <td>1351.500</td>\n",
       "      <td>1305.130</td>\n",
       "      <td>1330.9500</td>\n",
       "      <td>1238.860667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-05-19</th>\n",
       "      <td>1364.000</td>\n",
       "      <td>1346.110</td>\n",
       "      <td>1364.000</td>\n",
       "      <td>1338.000</td>\n",
       "      <td>1333.5720</td>\n",
       "      <td>1246.964333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-05-20</th>\n",
       "      <td>1346.110</td>\n",
       "      <td>1351.000</td>\n",
       "      <td>1359.180</td>\n",
       "      <td>1336.810</td>\n",
       "      <td>1336.5820</td>\n",
       "      <td>1253.831000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-05-21</th>\n",
       "      <td>1355.000</td>\n",
       "      <td>1366.100</td>\n",
       "      <td>1371.960</td>\n",
       "      <td>1352.860</td>\n",
       "      <td>1344.4840</td>\n",
       "      <td>1261.374667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-05-22</th>\n",
       "      <td>1366.000</td>\n",
       "      <td>1328.200</td>\n",
       "      <td>1366.100</td>\n",
       "      <td>1322.880</td>\n",
       "      <td>1347.5240</td>\n",
       "      <td>1266.983000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>1067 rows × 6 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                open     close      high       low        ma5         ma30\n",
       "date                                                                      \n",
       "2016-01-04   207.277   199.671   207.277   199.661        NaN          NaN\n",
       "2016-01-05   199.671   202.352   203.446   197.303        NaN          NaN\n",
       "2016-01-06   202.314   201.744   203.151   199.005        NaN          NaN\n",
       "2016-01-07   198.711   192.283   198.711   190.191        NaN          NaN\n",
       "2016-01-08   194.128   194.565   197.769   190.163   198.1230          NaN\n",
       "2016-01-11   193.167   190.030   193.766   189.592   196.1948          NaN\n",
       "2016-01-12   191.209   187.111   192.160   186.360   193.1466          NaN\n",
       "2016-01-13   189.307   189.954   195.868   188.832   190.7886          NaN\n",
       "2016-01-14   187.415   194.746   195.849   185.894   191.2812          NaN\n",
       "2016-01-15   194.679   189.212   196.039   188.261   190.2106          NaN\n",
       "2016-01-18   188.261   189.621   192.445   187.501   190.1288          NaN\n",
       "2016-01-19   191.114   199.899   199.985   190.172   192.6864          NaN\n",
       "2016-01-20   196.819   192.369   199.823   191.123   193.1694          NaN\n",
       "2016-01-21   191.361   190.410   194.527   190.068   192.3022          NaN\n",
       "2016-01-22   193.120   192.768   193.396   189.031   193.0134          NaN\n",
       "2016-01-25   193.015   192.797   193.481   191.589   193.6486          NaN\n",
       "2016-01-26   191.104   189.222   194.413   188.737   191.5132          NaN\n",
       "2016-01-27   190.144   190.096   191.009   186.074   191.0586          NaN\n",
       "2016-01-28   189.925   186.968   189.925   185.998   190.3702          NaN\n",
       "2016-01-29   187.767   190.781   192.540   187.310   189.9728          NaN\n",
       "2016-02-01   192.160   191.389   192.825   190.058   189.6912          NaN\n",
       "2016-02-02   192.064   194.489   194.727   190.771   190.7446          NaN\n",
       "2016-02-03   192.616   193.643   194.499   191.589   191.4540          NaN\n",
       "2016-02-04   194.727   194.907   195.754   193.529   193.0418          NaN\n",
       "2016-02-05   194.907   193.842   195.088   192.568   193.6540          NaN\n",
       "2016-02-15   190.163   190.553   193.015   189.783   193.4868          NaN\n",
       "2016-02-16   190.695   193.890   197.769   190.695   193.3670          NaN\n",
       "2016-02-17   193.719   192.350   194.841   190.648   193.1084          NaN\n",
       "2016-02-18   193.205   191.789   193.586   191.209   192.4848          NaN\n",
       "2016-02-19   191.703   193.120   193.186   191.237   192.3404   192.885700\n",
       "...              ...       ...       ...       ...        ...          ...\n",
       "2020-04-08  1152.000  1159.760  1166.310  1152.000  1141.5000  1096.299000\n",
       "2020-04-09  1166.000  1158.500  1169.000  1147.960  1152.6000  1099.125667\n",
       "2020-04-10  1157.880  1165.000  1181.500  1153.500  1156.6000  1101.712667\n",
       "2020-04-13  1165.000  1162.300  1169.980  1148.500  1161.1020  1105.222667\n",
       "2020-04-14  1176.000  1185.100  1191.550  1166.000  1166.1320  1108.525667\n",
       "2020-04-15  1192.000  1189.600  1203.990  1187.100  1172.1000  1111.079000\n",
       "2020-04-16  1192.970  1197.100  1197.100  1184.100  1179.8200  1113.351667\n",
       "2020-04-17  1210.000  1226.000  1234.560  1205.010  1192.0200  1115.185000\n",
       "2020-04-20  1221.000  1227.300  1231.500  1216.800  1205.0200  1117.578333\n",
       "2020-04-21  1221.020  1200.000  1223.990  1193.000  1208.0000  1120.444667\n",
       "2020-04-22  1206.000  1244.500  1249.500  1202.220  1218.9800  1123.394667\n",
       "2020-04-23  1250.000  1252.260  1265.680  1247.770  1230.0120  1126.519333\n",
       "2020-04-24  1248.000  1250.560  1259.890  1235.180  1234.9240  1130.254667\n",
       "2020-04-27  1257.000  1276.000  1278.170  1250.960  1244.6640  1135.720333\n",
       "2020-04-28  1285.310  1279.130  1299.940  1271.880  1260.4900  1142.791333\n",
       "2020-04-29  1277.800  1274.900  1288.100  1258.000  1266.5700  1150.451333\n",
       "2020-04-30  1271.000  1265.700  1285.010  1258.880  1269.2580  1159.041667\n",
       "2020-05-06  1251.000  1300.000  1300.000  1250.000  1279.1460  1169.175000\n",
       "2020-05-07  1299.400  1312.000  1314.990  1293.000  1286.3460  1178.399000\n",
       "2020-05-08  1317.000  1314.610  1338.000  1308.510  1293.4420  1188.252667\n",
       "2020-05-11  1320.000  1323.010  1335.000  1313.670  1303.0640  1197.153000\n",
       "2020-05-12  1318.000  1333.000  1334.990  1316.000  1316.5240  1205.583000\n",
       "2020-05-13  1333.000  1335.950  1337.990  1322.880  1323.7140  1214.617333\n",
       "2020-05-14  1330.000  1326.590  1334.880  1325.110  1326.6320  1222.987000\n",
       "2020-05-15  1329.000  1313.000  1333.500  1301.880  1326.3100  1231.020333\n",
       "2020-05-18  1306.000  1346.210  1351.500  1305.130  1330.9500  1238.860667\n",
       "2020-05-19  1364.000  1346.110  1364.000  1338.000  1333.5720  1246.964333\n",
       "2020-05-20  1346.110  1351.000  1359.180  1336.810  1336.5820  1253.831000\n",
       "2020-05-21  1355.000  1366.100  1371.960  1352.860  1344.4840  1261.374667\n",
       "2020-05-22  1366.000  1328.200  1366.100  1322.880  1347.5240  1266.983000\n",
       "\n",
       "[1067 rows x 6 columns]"
      ]
     },
     "execution_count": 38,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['ma5'] = np.nan\n",
    "df['ma30'] = np.nan\n",
    "df['ma5'] = df['close'].rolling(5).mean()  # 求5日均线\n",
    "df['ma30'] = df['close'].rolling(30).mean()  # 求30日均线\n",
    "df"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 使用matplotlib包可视化历史数据的收盘价和两条均线"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAEMCAYAAAA/Jf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P93hDd2MPg7fevHb036avqJq/sxu6R9kIXHJR/Um2LxZP6R/IdjD3h+90N/Y4eRdv9VCtRKfqHQT6WW/Z+4BKpdRS1bThcr0p2xd4Sv9AtoO5P9zjDd2NPU5WvPjWPQP94yzFZcJqf5fti8VT+geyHcz94TvdjT1OzsVrPVRFJAE9a/hTSqmjgSLbF3hK/0C2g7k/3OMN3Y09Tk68OvyAwWAwGJoHv5msw2AwGAyewzh3g8FgaIEY524wGAwtEOPcDQaDoQVinLvBYDC0QIxzNxgAEXlQRP5ygv2TRORUX+pkMDQF49wNhvoxCTDO3RAwmDx3w0mLiPwdPSfnbvTAVKuBfPR8mw70WOJTgAHoCZfzreUSS8QLQBxQDExTSm3ypf4Gw4kwzt1wUiIiKcAbwBD0tG1rgJeBmUqpHOuYR4AspdR/ROQN4HOl1IfWvkXATUqprSIyBD0k7TjfX4nB4J6g5lbAYGgmRgIfKaWKAUTkU6v8NMupt0FP2Ta/5hdFJAIYBnzgMtJsiNc1NhgagHHuhpMZd39b3wAmKaXWisg1wBg3x9iAQ0qpAd5TzWBoGqZB1XCysgS4SETCRCQSuMAqjwT2iUgwegYgJwXWPpRSh4HtInIZ6IkiRKS/71Q3GOrGxNwNJy0uDao7gUxgA1AE3GmVrQMilVLXiMhw4FXgKHApehjal4AO6DHH/6eUesjnF2Ew1IJx7gaDwdACMWEZg8FgaIEY524wGAwtEOPcDQaDoQVinLvBYDC0QIxzNxgMhhaIce4Gg8HQAjHO3WAwGFog/w8LmIIWn0OBPwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "df_show = df[:100]\n",
    "df_show[['close','ma5','ma30']].plot()\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 分析输出所有金叉日期和死叉日期"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {},
   "outputs": [],
   "source": [
    "df = df.dropna()  # 去掉缺失值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "DatetimeIndex(['2016-08-05', '2016-08-18', '2016-11-21', '2017-07-06',\n",
       "               '2017-09-08', '2017-11-29', '2018-02-05', '2018-03-27',\n",
       "               '2018-06-28', '2018-07-23', '2018-07-31', '2018-10-15',\n",
       "               '2018-12-25', '2019-05-10', '2019-07-19', '2019-11-28',\n",
       "               '2020-01-03', '2020-02-28', '2020-03-18'],\n",
       "              dtype='datetime64[ns]', name='date', freq=None)"
      ]
     },
     "execution_count": 41,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ma5_low_ma30 = df['ma5'] < df['ma30']  # 表示下降，返回bool值\n",
    "ma5_high_ma30 = df['ma5'] >= df['ma30']  # 表示上升\n",
    "# 第一段得出来的假设是TTFFTT，第二段肯定是FFTTTFF，如下：\n",
    "# TTFFTT\n",
    "# FFTTFF，那么第二段后退一位：\n",
    "# TTFFTT\n",
    "#  FFTTFF，那么当两段都是F时，就是金叉，两个都是T时就是死叉\n",
    "death_cross = df[ma5_low_ma30 & ma5_high_ma30.shift(1)].index\n",
    "# -(ma5_low_ma30 | ma5_high_ma30.shift(1)：取反(如果有一个是T)，那就是金叉\n",
    "golden_cross = df[-(ma5_low_ma30 | ma5_high_ma30.shift(1))].index\n",
    "death_cross"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 假如我从2010年1月1日开始，初始资金为100000元，金叉尽量买入，死叉全部卖出，则到今天位置，我的炒股收益率如何？"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "date\n",
       "2016-02-22    1\n",
       "2016-08-05    0\n",
       "2016-08-11    1\n",
       "2016-08-18    0\n",
       "2016-10-13    1\n",
       "2016-11-21    0\n",
       "2016-11-25    1\n",
       "2017-07-06    0\n",
       "2017-07-24    1\n",
       "2017-09-08    0\n",
       "2017-09-18    1\n",
       "2017-11-29    0\n",
       "2017-12-15    1\n",
       "2018-02-05    0\n",
       "2018-03-16    1\n",
       "2018-03-27    0\n",
       "2018-05-09    1\n",
       "2018-06-28    0\n",
       "2018-07-18    1\n",
       "2018-07-23    0\n",
       "2018-07-25    1\n",
       "2018-07-31    0\n",
       "2018-09-20    1\n",
       "2018-10-15    0\n",
       "2018-12-04    1\n",
       "2018-12-25    0\n",
       "2019-01-03    1\n",
       "2019-05-10    0\n",
       "2019-06-14    1\n",
       "2019-07-19    0\n",
       "2019-08-13    1\n",
       "2019-11-28    0\n",
       "2020-01-02    1\n",
       "2020-01-03    0\n",
       "2020-02-19    1\n",
       "2020-02-28    0\n",
       "2020-03-03    1\n",
       "2020-03-18    0\n",
       "2020-04-02    1\n",
       "dtype: int64"
      ]
     },
     "execution_count": 42,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sr1 = pd.Series(1, index=golden_cross)  # 1表示金叉\n",
    "sr2 = pd.Series(0, index=death_cross)  # 0表示死叉\n",
    "sr = sr1.append(sr2).sort_index()  # 合并到一起，以时间合并\n",
    "sr"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 60,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "4年多,利用双均线策略，启动资金121040赚了498022元\n"
     ]
    }
   ],
   "source": [
    "first_money = 121040  # 启动资金，这个是方便与简单策略作比较\n",
    "money = first_money\n",
    "hold = 0  # 持有多少股\n",
    "for i in range(0, len(sr)):\n",
    "    p = df['open'][sr.index[i]]  # 表示当天的价格\n",
    "    if sr.iloc[i] == 1:\n",
    "        # 金叉\n",
    "        buy = (money // (100 * p))  # 买一手（一手=100）\n",
    "        hold += buy * 100\n",
    "        money -= buy * 100 * p\n",
    "    else:\n",
    "        money += hold *p # 死叉的时候卖出\n",
    "        hold = 0\n",
    "now_p = df['open'][-1]\n",
    "now_money = hold * now_p + money\n",
    "\n",
    "print('4年多,利用双均线策略，启动资金%d赚了%d元'%(first_money, now_money - first_money))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 接下来我们对比下之前的简单股票分析策略的收益"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>open</th>\n",
       "      <th>close</th>\n",
       "      <th>high</th>\n",
       "      <th>low</th>\n",
       "      <th>ma5</th>\n",
       "      <th>ma30</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>date</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2016-09-01</th>\n",
       "      <td>300.814</td>\n",
       "      <td>299.853</td>\n",
       "      <td>303.048</td>\n",
       "      <td>299.406</td>\n",
       "      <td>297.9470</td>\n",
       "      <td>300.802933</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-09-02</th>\n",
       "      <td>299.163</td>\n",
       "      <td>297.007</td>\n",
       "      <td>300.571</td>\n",
       "      <td>296.133</td>\n",
       "      <td>298.7882</td>\n",
       "      <td>300.733667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-09-05</th>\n",
       "      <td>297.415</td>\n",
       "      <td>299.649</td>\n",
       "      <td>300.134</td>\n",
       "      <td>297.036</td>\n",
       "      <td>298.9766</td>\n",
       "      <td>300.644300</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-09-06</th>\n",
       "      <td>299.649</td>\n",
       "      <td>301.047</td>\n",
       "      <td>301.455</td>\n",
       "      <td>299.503</td>\n",
       "      <td>299.7692</td>\n",
       "      <td>300.349667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-09-07</th>\n",
       "      <td>300.795</td>\n",
       "      <td>297.803</td>\n",
       "      <td>300.795</td>\n",
       "      <td>296.735</td>\n",
       "      <td>299.0718</td>\n",
       "      <td>300.109733</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-09-08</th>\n",
       "      <td>296.453</td>\n",
       "      <td>297.046</td>\n",
       "      <td>297.706</td>\n",
       "      <td>295.676</td>\n",
       "      <td>298.5104</td>\n",
       "      <td>299.778533</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-09-09</th>\n",
       "      <td>297.852</td>\n",
       "      <td>295.890</td>\n",
       "      <td>298.056</td>\n",
       "      <td>295.278</td>\n",
       "      <td>298.2870</td>\n",
       "      <td>299.502700</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-09-12</th>\n",
       "      <td>293.335</td>\n",
       "      <td>289.508</td>\n",
       "      <td>295.278</td>\n",
       "      <td>289.227</td>\n",
       "      <td>296.2588</td>\n",
       "      <td>299.214533</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-09-13</th>\n",
       "      <td>291.344</td>\n",
       "      <td>291.810</td>\n",
       "      <td>292.335</td>\n",
       "      <td>290.713</td>\n",
       "      <td>294.4114</td>\n",
       "      <td>299.027400</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-09-14</th>\n",
       "      <td>291.490</td>\n",
       "      <td>290.975</td>\n",
       "      <td>293.530</td>\n",
       "      <td>289.460</td>\n",
       "      <td>293.0458</td>\n",
       "      <td>298.792667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-09-19</th>\n",
       "      <td>291.441</td>\n",
       "      <td>291.519</td>\n",
       "      <td>292.918</td>\n",
       "      <td>291.276</td>\n",
       "      <td>291.9404</td>\n",
       "      <td>298.592900</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-09-20</th>\n",
       "      <td>292.150</td>\n",
       "      <td>286.497</td>\n",
       "      <td>292.170</td>\n",
       "      <td>285.565</td>\n",
       "      <td>290.0618</td>\n",
       "      <td>298.237733</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-09-21</th>\n",
       "      <td>286.594</td>\n",
       "      <td>285.613</td>\n",
       "      <td>286.915</td>\n",
       "      <td>280.815</td>\n",
       "      <td>289.2828</td>\n",
       "      <td>297.782833</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-09-22</th>\n",
       "      <td>285.856</td>\n",
       "      <td>288.459</td>\n",
       "      <td>291.373</td>\n",
       "      <td>285.574</td>\n",
       "      <td>288.6126</td>\n",
       "      <td>297.175100</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-09-23</th>\n",
       "      <td>288.498</td>\n",
       "      <td>289.139</td>\n",
       "      <td>290.373</td>\n",
       "      <td>286.925</td>\n",
       "      <td>288.2454</td>\n",
       "      <td>296.652867</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-09-26</th>\n",
       "      <td>288.479</td>\n",
       "      <td>280.446</td>\n",
       "      <td>288.488</td>\n",
       "      <td>280.271</td>\n",
       "      <td>286.0308</td>\n",
       "      <td>295.745033</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-09-27</th>\n",
       "      <td>280.592</td>\n",
       "      <td>282.816</td>\n",
       "      <td>283.603</td>\n",
       "      <td>280.475</td>\n",
       "      <td>285.2946</td>\n",
       "      <td>294.909700</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-09-28</th>\n",
       "      <td>283.418</td>\n",
       "      <td>280.135</td>\n",
       "      <td>283.418</td>\n",
       "      <td>279.310</td>\n",
       "      <td>284.1990</td>\n",
       "      <td>293.926400</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-09-29</th>\n",
       "      <td>279.591</td>\n",
       "      <td>282.631</td>\n",
       "      <td>284.593</td>\n",
       "      <td>279.591</td>\n",
       "      <td>283.0334</td>\n",
       "      <td>293.326133</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-09-30</th>\n",
       "      <td>281.680</td>\n",
       "      <td>289.363</td>\n",
       "      <td>291.033</td>\n",
       "      <td>281.680</td>\n",
       "      <td>283.0782</td>\n",
       "      <td>292.994267</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-10-10</th>\n",
       "      <td>289.945</td>\n",
       "      <td>294.268</td>\n",
       "      <td>295.142</td>\n",
       "      <td>289.945</td>\n",
       "      <td>285.8426</td>\n",
       "      <td>292.881933</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-10-11</th>\n",
       "      <td>295.278</td>\n",
       "      <td>300.057</td>\n",
       "      <td>300.134</td>\n",
       "      <td>294.307</td>\n",
       "      <td>289.2908</td>\n",
       "      <td>292.960933</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-10-12</th>\n",
       "      <td>299.649</td>\n",
       "      <td>297.046</td>\n",
       "      <td>299.649</td>\n",
       "      <td>296.152</td>\n",
       "      <td>292.6730</td>\n",
       "      <td>292.912367</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-10-13</th>\n",
       "      <td>297.998</td>\n",
       "      <td>295.171</td>\n",
       "      <td>298.134</td>\n",
       "      <td>294.802</td>\n",
       "      <td>295.1810</td>\n",
       "      <td>292.815567</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-10-14</th>\n",
       "      <td>294.763</td>\n",
       "      <td>296.832</td>\n",
       "      <td>297.220</td>\n",
       "      <td>294.501</td>\n",
       "      <td>296.6748</td>\n",
       "      <td>292.825933</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-10-17</th>\n",
       "      <td>296.686</td>\n",
       "      <td>293.772</td>\n",
       "      <td>296.735</td>\n",
       "      <td>292.850</td>\n",
       "      <td>296.5756</td>\n",
       "      <td>292.807800</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-10-18</th>\n",
       "      <td>293.821</td>\n",
       "      <td>298.347</td>\n",
       "      <td>299.649</td>\n",
       "      <td>293.335</td>\n",
       "      <td>296.2336</td>\n",
       "      <td>292.992667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-10-19</th>\n",
       "      <td>299.649</td>\n",
       "      <td>297.658</td>\n",
       "      <td>299.892</td>\n",
       "      <td>296.346</td>\n",
       "      <td>296.3560</td>\n",
       "      <td>292.957700</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-10-20</th>\n",
       "      <td>298.571</td>\n",
       "      <td>296.715</td>\n",
       "      <td>298.571</td>\n",
       "      <td>296.055</td>\n",
       "      <td>296.6648</td>\n",
       "      <td>292.945400</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-10-21</th>\n",
       "      <td>296.327</td>\n",
       "      <td>295.462</td>\n",
       "      <td>296.715</td>\n",
       "      <td>293.908</td>\n",
       "      <td>296.3908</td>\n",
       "      <td>292.751133</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-03-19</th>\n",
       "      <td>993.990</td>\n",
       "      <td>996.000</td>\n",
       "      <td>1015.000</td>\n",
       "      <td>960.100</td>\n",
       "      <td>1045.6240</td>\n",
       "      <td>1095.054000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-03-20</th>\n",
       "      <td>1011.000</td>\n",
       "      <td>1035.280</td>\n",
       "      <td>1043.000</td>\n",
       "      <td>1011.000</td>\n",
       "      <td>1030.2740</td>\n",
       "      <td>1093.696667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-03-23</th>\n",
       "      <td>1000.000</td>\n",
       "      <td>1019.000</td>\n",
       "      <td>1035.280</td>\n",
       "      <td>991.520</td>\n",
       "      <td>1020.6740</td>\n",
       "      <td>1092.113667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-03-24</th>\n",
       "      <td>1043.000</td>\n",
       "      <td>1056.000</td>\n",
       "      <td>1058.880</td>\n",
       "      <td>1035.000</td>\n",
       "      <td>1022.8540</td>\n",
       "      <td>1090.713667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-03-25</th>\n",
       "      <td>1087.980</td>\n",
       "      <td>1080.100</td>\n",
       "      <td>1091.360</td>\n",
       "      <td>1074.200</td>\n",
       "      <td>1037.2760</td>\n",
       "      <td>1090.141333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-03-26</th>\n",
       "      <td>1073.330</td>\n",
       "      <td>1064.920</td>\n",
       "      <td>1091.200</td>\n",
       "      <td>1062.000</td>\n",
       "      <td>1051.0600</td>\n",
       "      <td>1089.272000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-03-27</th>\n",
       "      <td>1085.000</td>\n",
       "      <td>1075.500</td>\n",
       "      <td>1092.000</td>\n",
       "      <td>1075.010</td>\n",
       "      <td>1059.1040</td>\n",
       "      <td>1088.855333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-03-30</th>\n",
       "      <td>1060.250</td>\n",
       "      <td>1072.000</td>\n",
       "      <td>1077.000</td>\n",
       "      <td>1057.000</td>\n",
       "      <td>1069.7040</td>\n",
       "      <td>1088.128000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-03-31</th>\n",
       "      <td>1082.000</td>\n",
       "      <td>1111.000</td>\n",
       "      <td>1115.000</td>\n",
       "      <td>1081.800</td>\n",
       "      <td>1080.7040</td>\n",
       "      <td>1089.028000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-01</th>\n",
       "      <td>1117.000</td>\n",
       "      <td>1103.000</td>\n",
       "      <td>1129.000</td>\n",
       "      <td>1103.000</td>\n",
       "      <td>1085.2840</td>\n",
       "      <td>1089.244667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-02</th>\n",
       "      <td>1104.000</td>\n",
       "      <td>1145.000</td>\n",
       "      <td>1145.000</td>\n",
       "      <td>1103.880</td>\n",
       "      <td>1101.3000</td>\n",
       "      <td>1090.144667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-03</th>\n",
       "      <td>1139.030</td>\n",
       "      <td>1139.790</td>\n",
       "      <td>1147.960</td>\n",
       "      <td>1131.980</td>\n",
       "      <td>1114.1580</td>\n",
       "      <td>1091.041667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-07</th>\n",
       "      <td>1161.950</td>\n",
       "      <td>1159.950</td>\n",
       "      <td>1166.500</td>\n",
       "      <td>1148.890</td>\n",
       "      <td>1131.7480</td>\n",
       "      <td>1093.467333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-08</th>\n",
       "      <td>1152.000</td>\n",
       "      <td>1159.760</td>\n",
       "      <td>1166.310</td>\n",
       "      <td>1152.000</td>\n",
       "      <td>1141.5000</td>\n",
       "      <td>1096.299000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-09</th>\n",
       "      <td>1166.000</td>\n",
       "      <td>1158.500</td>\n",
       "      <td>1169.000</td>\n",
       "      <td>1147.960</td>\n",
       "      <td>1152.6000</td>\n",
       "      <td>1099.125667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-10</th>\n",
       "      <td>1157.880</td>\n",
       "      <td>1165.000</td>\n",
       "      <td>1181.500</td>\n",
       "      <td>1153.500</td>\n",
       "      <td>1156.6000</td>\n",
       "      <td>1101.712667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-13</th>\n",
       "      <td>1165.000</td>\n",
       "      <td>1162.300</td>\n",
       "      <td>1169.980</td>\n",
       "      <td>1148.500</td>\n",
       "      <td>1161.1020</td>\n",
       "      <td>1105.222667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-14</th>\n",
       "      <td>1176.000</td>\n",
       "      <td>1185.100</td>\n",
       "      <td>1191.550</td>\n",
       "      <td>1166.000</td>\n",
       "      <td>1166.1320</td>\n",
       "      <td>1108.525667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-15</th>\n",
       "      <td>1192.000</td>\n",
       "      <td>1189.600</td>\n",
       "      <td>1203.990</td>\n",
       "      <td>1187.100</td>\n",
       "      <td>1172.1000</td>\n",
       "      <td>1111.079000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-16</th>\n",
       "      <td>1192.970</td>\n",
       "      <td>1197.100</td>\n",
       "      <td>1197.100</td>\n",
       "      <td>1184.100</td>\n",
       "      <td>1179.8200</td>\n",
       "      <td>1113.351667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-17</th>\n",
       "      <td>1210.000</td>\n",
       "      <td>1226.000</td>\n",
       "      <td>1234.560</td>\n",
       "      <td>1205.010</td>\n",
       "      <td>1192.0200</td>\n",
       "      <td>1115.185000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-20</th>\n",
       "      <td>1221.000</td>\n",
       "      <td>1227.300</td>\n",
       "      <td>1231.500</td>\n",
       "      <td>1216.800</td>\n",
       "      <td>1205.0200</td>\n",
       "      <td>1117.578333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-21</th>\n",
       "      <td>1221.020</td>\n",
       "      <td>1200.000</td>\n",
       "      <td>1223.990</td>\n",
       "      <td>1193.000</td>\n",
       "      <td>1208.0000</td>\n",
       "      <td>1120.444667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-22</th>\n",
       "      <td>1206.000</td>\n",
       "      <td>1244.500</td>\n",
       "      <td>1249.500</td>\n",
       "      <td>1202.220</td>\n",
       "      <td>1218.9800</td>\n",
       "      <td>1123.394667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-23</th>\n",
       "      <td>1250.000</td>\n",
       "      <td>1252.260</td>\n",
       "      <td>1265.680</td>\n",
       "      <td>1247.770</td>\n",
       "      <td>1230.0120</td>\n",
       "      <td>1126.519333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-24</th>\n",
       "      <td>1248.000</td>\n",
       "      <td>1250.560</td>\n",
       "      <td>1259.890</td>\n",
       "      <td>1235.180</td>\n",
       "      <td>1234.9240</td>\n",
       "      <td>1130.254667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-27</th>\n",
       "      <td>1257.000</td>\n",
       "      <td>1276.000</td>\n",
       "      <td>1278.170</td>\n",
       "      <td>1250.960</td>\n",
       "      <td>1244.6640</td>\n",
       "      <td>1135.720333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-28</th>\n",
       "      <td>1285.310</td>\n",
       "      <td>1279.130</td>\n",
       "      <td>1299.940</td>\n",
       "      <td>1271.880</td>\n",
       "      <td>1260.4900</td>\n",
       "      <td>1142.791333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-29</th>\n",
       "      <td>1277.800</td>\n",
       "      <td>1274.900</td>\n",
       "      <td>1288.100</td>\n",
       "      <td>1258.000</td>\n",
       "      <td>1266.5700</td>\n",
       "      <td>1150.451333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-04-30</th>\n",
       "      <td>1271.000</td>\n",
       "      <td>1265.700</td>\n",
       "      <td>1285.010</td>\n",
       "      <td>1258.880</td>\n",
       "      <td>1269.2580</td>\n",
       "      <td>1159.041667</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>890 rows × 6 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                open     close      high       low        ma5         ma30\n",
       "date                                                                      \n",
       "2016-09-01   300.814   299.853   303.048   299.406   297.9470   300.802933\n",
       "2016-09-02   299.163   297.007   300.571   296.133   298.7882   300.733667\n",
       "2016-09-05   297.415   299.649   300.134   297.036   298.9766   300.644300\n",
       "2016-09-06   299.649   301.047   301.455   299.503   299.7692   300.349667\n",
       "2016-09-07   300.795   297.803   300.795   296.735   299.0718   300.109733\n",
       "2016-09-08   296.453   297.046   297.706   295.676   298.5104   299.778533\n",
       "2016-09-09   297.852   295.890   298.056   295.278   298.2870   299.502700\n",
       "2016-09-12   293.335   289.508   295.278   289.227   296.2588   299.214533\n",
       "2016-09-13   291.344   291.810   292.335   290.713   294.4114   299.027400\n",
       "2016-09-14   291.490   290.975   293.530   289.460   293.0458   298.792667\n",
       "2016-09-19   291.441   291.519   292.918   291.276   291.9404   298.592900\n",
       "2016-09-20   292.150   286.497   292.170   285.565   290.0618   298.237733\n",
       "2016-09-21   286.594   285.613   286.915   280.815   289.2828   297.782833\n",
       "2016-09-22   285.856   288.459   291.373   285.574   288.6126   297.175100\n",
       "2016-09-23   288.498   289.139   290.373   286.925   288.2454   296.652867\n",
       "2016-09-26   288.479   280.446   288.488   280.271   286.0308   295.745033\n",
       "2016-09-27   280.592   282.816   283.603   280.475   285.2946   294.909700\n",
       "2016-09-28   283.418   280.135   283.418   279.310   284.1990   293.926400\n",
       "2016-09-29   279.591   282.631   284.593   279.591   283.0334   293.326133\n",
       "2016-09-30   281.680   289.363   291.033   281.680   283.0782   292.994267\n",
       "2016-10-10   289.945   294.268   295.142   289.945   285.8426   292.881933\n",
       "2016-10-11   295.278   300.057   300.134   294.307   289.2908   292.960933\n",
       "2016-10-12   299.649   297.046   299.649   296.152   292.6730   292.912367\n",
       "2016-10-13   297.998   295.171   298.134   294.802   295.1810   292.815567\n",
       "2016-10-14   294.763   296.832   297.220   294.501   296.6748   292.825933\n",
       "2016-10-17   296.686   293.772   296.735   292.850   296.5756   292.807800\n",
       "2016-10-18   293.821   298.347   299.649   293.335   296.2336   292.992667\n",
       "2016-10-19   299.649   297.658   299.892   296.346   296.3560   292.957700\n",
       "2016-10-20   298.571   296.715   298.571   296.055   296.6648   292.945400\n",
       "2016-10-21   296.327   295.462   296.715   293.908   296.3908   292.751133\n",
       "...              ...       ...       ...       ...        ...          ...\n",
       "2020-03-19   993.990   996.000  1015.000   960.100  1045.6240  1095.054000\n",
       "2020-03-20  1011.000  1035.280  1043.000  1011.000  1030.2740  1093.696667\n",
       "2020-03-23  1000.000  1019.000  1035.280   991.520  1020.6740  1092.113667\n",
       "2020-03-24  1043.000  1056.000  1058.880  1035.000  1022.8540  1090.713667\n",
       "2020-03-25  1087.980  1080.100  1091.360  1074.200  1037.2760  1090.141333\n",
       "2020-03-26  1073.330  1064.920  1091.200  1062.000  1051.0600  1089.272000\n",
       "2020-03-27  1085.000  1075.500  1092.000  1075.010  1059.1040  1088.855333\n",
       "2020-03-30  1060.250  1072.000  1077.000  1057.000  1069.7040  1088.128000\n",
       "2020-03-31  1082.000  1111.000  1115.000  1081.800  1080.7040  1089.028000\n",
       "2020-04-01  1117.000  1103.000  1129.000  1103.000  1085.2840  1089.244667\n",
       "2020-04-02  1104.000  1145.000  1145.000  1103.880  1101.3000  1090.144667\n",
       "2020-04-03  1139.030  1139.790  1147.960  1131.980  1114.1580  1091.041667\n",
       "2020-04-07  1161.950  1159.950  1166.500  1148.890  1131.7480  1093.467333\n",
       "2020-04-08  1152.000  1159.760  1166.310  1152.000  1141.5000  1096.299000\n",
       "2020-04-09  1166.000  1158.500  1169.000  1147.960  1152.6000  1099.125667\n",
       "2020-04-10  1157.880  1165.000  1181.500  1153.500  1156.6000  1101.712667\n",
       "2020-04-13  1165.000  1162.300  1169.980  1148.500  1161.1020  1105.222667\n",
       "2020-04-14  1176.000  1185.100  1191.550  1166.000  1166.1320  1108.525667\n",
       "2020-04-15  1192.000  1189.600  1203.990  1187.100  1172.1000  1111.079000\n",
       "2020-04-16  1192.970  1197.100  1197.100  1184.100  1179.8200  1113.351667\n",
       "2020-04-17  1210.000  1226.000  1234.560  1205.010  1192.0200  1115.185000\n",
       "2020-04-20  1221.000  1227.300  1231.500  1216.800  1205.0200  1117.578333\n",
       "2020-04-21  1221.020  1200.000  1223.990  1193.000  1208.0000  1120.444667\n",
       "2020-04-22  1206.000  1244.500  1249.500  1202.220  1218.9800  1123.394667\n",
       "2020-04-23  1250.000  1252.260  1265.680  1247.770  1230.0120  1126.519333\n",
       "2020-04-24  1248.000  1250.560  1259.890  1235.180  1234.9240  1130.254667\n",
       "2020-04-27  1257.000  1276.000  1278.170  1250.960  1244.6640  1135.720333\n",
       "2020-04-28  1285.310  1279.130  1299.940  1271.880  1260.4900  1142.791333\n",
       "2020-04-29  1277.800  1274.900  1288.100  1258.000  1266.5700  1150.451333\n",
       "2020-04-30  1271.000  1265.700  1285.010  1258.880  1269.2580  1159.041667\n",
       "\n",
       "[890 rows x 6 columns]"
      ]
     },
     "execution_count": 51,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "price_last = df['open'][-1]  # 最后一天的开盘价\n",
    "df_easy = df['2016-09':'2020-04']  # 删除首尾无用的数据，即没有月初或月末的\n",
    "df_easy"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "metadata": {},
   "outputs": [],
   "source": [
    "df_monthly = df_easy.resample(\"MS\").first()  # 取第一个月,去掉S标识是末天的标识，但数据还是月初的\n",
    "df_yearly = df_easy.resample(\"A\").last()[:-1]  # 取一年的最后交易日的值，并去掉没有12月的20年（现在时间是20年05月）"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 59,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "最终赚了441819元\n",
      "4年多,利用简单股票策略，启动资金121040赚了320779元\n"
     ]
    }
   ],
   "source": [
    "cost_money = 0  # 花多少钱\n",
    "hold_easy = 0  # 现在有多少股票\n",
    "first_cost = df_monthly[str('2016')]['open'].sum()*100  # 第一年买股需要的钱\n",
    "for year in range(2016,2021):\n",
    "    cost_money += df_monthly[str(year)]['open'].sum()*100  # 每年第一个月买100股花的钱\n",
    "    hold_easy += len(df_monthly[str(year)]['open'])*100  # 持有的股票\n",
    "    if year != 2020:  # 如果不是最后一年，则需要把股票卖出\n",
    "        cost_money -= df_yearly[str(year)]['open'][0]*hold_easy  # 获取开盘价并卖出去\n",
    "        hold_easy = 0\n",
    "cost_money -= hold * price_last\n",
    "print('4年多,利用简单股票策略，启动资金%d赚了%d元'\n",
    "      %(first_cost, ((-cost_money) - first_cost)))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 64,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "4年多，利用双均线策略比简单策略多赚177243元\n"
     ]
    }
   ],
   "source": [
    "dif_money = (now_money - first_money) - ((-cost_money) - first_cost)\n",
    "print('4年多，利用双均线策略比简单策略多赚%d元'%dif_money)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
